package gd.qaq.blue.bluespick.util;

import gd.qaq.blue.bluespick.BluesPick;
import gd.qaq.blue.bluespick.dto.AreaData;
import gd.qaq.blue.bluespick.util.area.Area;
import org.bukkit.Location;

public class AreaUtil {
    public static AreaData getCurrentArea(Location target) {
        for (AreaData area : BluesPick.areas) {
            Area currentArea = area.getArea();
            if (currentArea.contain(target)) {
                return area;
            }
        }
        return null;
    }
}
